/*
 * @Description: 
 * @Autor: 赵子惠
 * @Date: 2021-09-06 16:11:33
 * @LastEditors: 赵子惠
 * @LastEditTime: 2021-09-07 11:02:07
 */
import { AfterViewChecked, Component, ElementRef, EventEmitter, Injector, Input, Output, ViewChild } from '@angular/core';
import { AppComponentBase } from '@shared/common/app-component-base';
import { ModalDirective } from 'ngx-bootstrap';
import * as _ from 'lodash';
import { finalize } from 'rxjs/operators';
import { MessageService } from '@abp/message/message.service';
import { OperationHistoryServiceProxy } from '@shared/service-proxies/service-proxies';
@Component({
  selector: 'app-resume',
  templateUrl: './resume.component.html',
  styleUrls: ['./resume.component.less']
})
export class ResumeComponent extends AppComponentBase {
     //引入子组件
 @ViewChild('createOrEditModal') modal: ModalDirective;
 @Input() parentInfo: any;
    tableData = []
    active = false;

    constructor(
        injector: Injector,
        private _messageService: MessageService,
        private _operationHistoryServiceProxy: OperationHistoryServiceProxy,
    ) {
        super(injector);
    }

  ngOnInit() {
  }
  getTableList(){
    if (this.parentInfo && this.parentInfo.id) {
        this._operationHistoryServiceProxy.getOperationLogList(this.parentInfo.id)
            .pipe(finalize(() => { }))
            .subscribe(result => {
                this.tableData = result
            })
    }
  }
 //查看新增任务
 show(): void {
    this.active = true;
    this.modal.show();
}
//关闭事件
close(): void {
    this.active = false;
    this.modal.hide();
}
onShown(): void {

}
}
